mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #195 from omnivore-app/fix/settings-theme
Set theme on emails and labels pages
This commit is contained in:
commit
86220091ba
2 changed files with 6 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue