mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-27 14:55:20 +03:00
Clean up lint errors in Thoughts
Removed unused imports, variables and functions from Thoughts source files
This commit is contained in:
parent
2d54d005e5
commit
2c417ee188
@ -9,7 +9,6 @@ import TopNavbar from './TopNavbar.js'
|
||||
import { getTagColor } from './tag.js'
|
||||
|
||||
import createThought from '@wasp/actions/createThought'
|
||||
import { useQuery } from '@wasp/queries'
|
||||
|
||||
// TODO:
|
||||
// - Rename this file to Thought.js.
|
||||
@ -62,10 +61,6 @@ const Thought = (props) => {
|
||||
setInPreviewMode(defaultInPreviewMode)
|
||||
}
|
||||
|
||||
const togglePreviewMode = () => {
|
||||
setInPreviewMode(!inPreviewMode)
|
||||
}
|
||||
|
||||
const setNewTagNameIfValid = (tagName) => {
|
||||
if (!tagName || /^[a-z](\.?[a-z0-9])*\.?$/.test(tagName)) {
|
||||
setNewTagName(tagName)
|
||||
|
@ -9,7 +9,7 @@ import { useQuery } from '@wasp/queries'
|
||||
|
||||
// Props: active TODO: document this properly.
|
||||
const TagsSidebar = (props) => {
|
||||
const { data: tags, isFetching, error } = useQuery(getTags)
|
||||
const { data: tags } = useQuery(getTags)
|
||||
|
||||
return (
|
||||
<div className="tags-sidebar">
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
|
||||
import './Main.css'
|
||||
import './ThoughtsPage.css'
|
||||
@ -11,13 +11,12 @@ import TopNavbar from './TopNavbar.js'
|
||||
import getThoughts from '@wasp/queries/getThoughts'
|
||||
import { useQuery } from '@wasp/queries'
|
||||
|
||||
|
||||
const ThoughtsPage = (props) => {
|
||||
const queryParams = new URLSearchParams(useLocation().search)
|
||||
const tag = queryParams.get('tag')
|
||||
|
||||
// TODO: Handle possible errors and fetching.
|
||||
const { data: thoughts, isFetching, error } = useQuery(getThoughts, { tagName: tag })
|
||||
const { data: thoughts } = useQuery(getThoughts, { tagName: tag })
|
||||
|
||||
// TODO: Duplication! layout, navbar, sidebar, ...
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user