diff --git a/components/footer.js b/components/footer.js index 20fb5277..31289eb0 100644 --- a/components/footer.js +++ b/components/footer.js @@ -80,7 +80,7 @@ const handleThemeChange = (dark) => { const RssPopover = ( - + home @@ -93,6 +93,10 @@ const RssPopover = ( nostr \ + + tech + + \ jobs diff --git a/components/header.js b/components/header.js index 19eeac62..cce539da 100644 --- a/components/header.js +++ b/components/header.js @@ -218,7 +218,7 @@ export default function Header ({ sub }) { onChange={(formik, e) => router.push(e.target.value === 'home' ? '/' : `/~${e.target.value}`)} name='sub' size='sm' - items={['home', 'bitcoin', 'nostr', 'jobs']} + items={['home', 'bitcoin', 'nostr', 'tech', 'jobs']} /> diff --git a/components/sub-select-form.js b/components/sub-select-form.js index f4406bef..7dab52f4 100644 --- a/components/sub-select-form.js +++ b/components/sub-select-form.js @@ -21,6 +21,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) {
  • If it's bitcoin related, put it in the bitcoin sub.
  • If it's nostr related, put it in the nostr sub.
  • +
  • If it's tech related, put it in the tech sub.
  • If it's a job, put it in the jobs sub.
@@ -43,7 +44,7 @@ export default function SubSelect ({ label, sub, setSub, item, ...props }) { name='sub' size='sm' defaultValue={props.noForm ? sub : undefined} - items={props.noForm ? ['pick sub', 'bitcoin', 'nostr', 'jobs'] : item ? ['bitcoin', 'nostr'] : ['pick sub', 'bitcoin', 'nostr']} + items={props.noForm ? ['pick sub', 'bitcoin', 'nostr', 'tech', 'jobs'] : item ? ['bitcoin', 'nostr', 'tech'] : ['pick sub', 'bitcoin', 'nostr', 'tech']} label={label && <> {label} diff --git a/lib/validate.js b/lib/validate.js index 01c92445..53605185 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -84,7 +84,7 @@ export function advPostSchemaMembers (client) { export function subSelectSchemaMembers (client) { return { - sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr'], 'required') + sub: Yup.string().required('required').oneOf(['bitcoin', 'nostr', 'tech'], 'required') } } diff --git a/prisma/migrations/20230612113342_tech_sub/migration.sql b/prisma/migrations/20230612113342_tech_sub/migration.sql new file mode 100644 index 00000000..dd8c38b5 --- /dev/null +++ b/prisma/migrations/20230612113342_tech_sub/migration.sql @@ -0,0 +1,2 @@ +INSERT INTO "Sub" ("name", "desc", "postTypes", "rankingType") +VALUES ('tech', 'everything tech related', '{LINK,DISCUSSION,POLL,BOUNTY}', 'WOT') ON CONFLICT DO NOTHING; \ No newline at end of file