Merge pull request #195 from omnivore-app/fix/settings-theme
Set theme on emails and labels pages
This commit is contained in:
@ -10,6 +10,7 @@ import { toast, Toaster } from 'react-hot-toast'
|
||||
import { useCallback } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { StyledText } from '../../components/elements/StyledText'
|
||||
import { applyStoredTheme } from '../../lib/themeUpdater'
|
||||
|
||||
enum TextType {
|
||||
EmailAddress,
|
||||
@ -39,6 +40,8 @@ function CopyTextButton(props: CopyTextButtonProps): JSX.Element {
|
||||
export default function EmailsPage(): JSX.Element {
|
||||
const { emailAddresses, revalidate, isValidating } = useGetNewsletterEmailsQuery()
|
||||
|
||||
applyStoredTheme(false)
|
||||
|
||||
async function createEmail(): Promise<void> {
|
||||
await createNewsletterEmailMutation()
|
||||
revalidate()
|
||||
|
||||
@ -6,6 +6,7 @@ import { useGetLabelsQuery } from '../../lib/networking/queries/useGetLabelsQuer
|
||||
import { createLabelMutation } from '../../lib/networking/mutations/createLabelMutation'
|
||||
import { deleteLabelMutation } from '../../lib/networking/mutations/deleteLabelMutation'
|
||||
import { useState } from 'react'
|
||||
import { applyStoredTheme } from '../../lib/themeUpdater'
|
||||
|
||||
export default function LabelsPage(): JSX.Element {
|
||||
const { labels, revalidate, isValidating } = useGetLabelsQuery()
|
||||
@ -13,6 +14,8 @@ export default function LabelsPage(): JSX.Element {
|
||||
const [color, setColor] = useState('')
|
||||
const [description, setDescription] = useState('')
|
||||
|
||||
applyStoredTheme(false)
|
||||
|
||||
async function createLabel(): Promise<void> {
|
||||
const res = await createLabelMutation(name, color, description)
|
||||
if (res) {
|
||||
|
||||
Reference in New Issue
Block a user