mirror of
https://github.com/tjsga/tj-sga-website-react.git
synced 2025-04-21 12:00:17 -04:00
Renamed typo "useInitiative" to "useQuery"
This commit is contained in:
parent
6fe3b8d2c8
commit
5c06931dcc
|
@ -21,7 +21,7 @@ export default function Footer() {
|
||||||
{footer.columns.map((col) => {
|
{footer.columns.map((col) => {
|
||||||
return (
|
return (
|
||||||
<div className='footer-col' key={col._id}>
|
<div className='footer-col' key={col._id}>
|
||||||
<BlockContent blocks={col.content}></BlockContent>
|
<BlockContent blocks={col.content} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
import InitiativeColumn from './InitiativeColumn';
|
import InitiativeColumn from './InitiativeColumn';
|
||||||
|
|
||||||
export default function InitiativeList() {
|
export default function InitiativeList() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
import ArticleRow from './ArticleRow';
|
import ArticleRow from './ArticleRow';
|
||||||
|
|
||||||
export default function RecentNews() {
|
export default function RecentNews() {
|
||||||
|
|
|
@ -2,20 +2,13 @@ import React from 'react';
|
||||||
import sanity from '../sanity';
|
import sanity from '../sanity';
|
||||||
import { SanityDocument } from '@sanity/client/sanityClient';
|
import { SanityDocument } from '@sanity/client/sanityClient';
|
||||||
|
|
||||||
interface FooterDocument {
|
|
||||||
columns: {
|
|
||||||
_id: string;
|
|
||||||
content: any[];
|
|
||||||
}[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function useFooter() {
|
export default function useFooter() {
|
||||||
let [footer, setFooter] = React.useState<
|
let [footer, setFooter] = React.useState<
|
||||||
SanityDocument<FooterDocument> | undefined
|
SanityDocument<SGA.FooterDocument> | undefined
|
||||||
>();
|
>();
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
sanity.getDocument<FooterDocument>('footer').then(setFooter);
|
sanity.getDocument<SGA.FooterDocument>('footer').then(setFooter);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return footer;
|
return footer;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Hero from '../components/Hero';
|
import Hero from '../components/Hero';
|
||||||
import MemberRow from '../components/MemberRow';
|
import MemberRow from '../components/MemberRow';
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
|
|
||||||
export default function ClassCouncil() {
|
export default function ClassCouncil() {
|
||||||
let members = useQuery<SGA.MemberDocument[]>(
|
let members = useQuery<SGA.MemberDocument[]>(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Hero from '../components/Hero';
|
import Hero from '../components/Hero';
|
||||||
import MemberRow from '../components/MemberRow';
|
import MemberRow from '../components/MemberRow';
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
|
|
||||||
export default function Committee() {
|
export default function Committee() {
|
||||||
let excomm = useQuery<SGA.MemberDocument[]>(
|
let excomm = useQuery<SGA.MemberDocument[]>(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Hero from '../components/Hero';
|
import Hero from '../components/Hero';
|
||||||
import InitiativeRow from '../components/InitiativeRow';
|
import InitiativeRow from '../components/InitiativeRow';
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
|
|
||||||
export default function Initiatives() {
|
export default function Initiatives() {
|
||||||
let initiatives = useQuery<SGA.InitiativeDocument[]>(
|
let initiatives = useQuery<SGA.InitiativeDocument[]>(
|
||||||
|
|
38
src/pages/involved.tsx
Normal file
38
src/pages/involved.tsx
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
import { SanityDocument } from '@sanity/client';
|
||||||
|
import React from 'react';
|
||||||
|
import GetInvolvedRow from '../components/GetInvolvedRow';
|
||||||
|
import Hero from '../components/Hero';
|
||||||
|
import '../css/get-involved.css';
|
||||||
|
import sanity from '../sanity';
|
||||||
|
|
||||||
|
export default function GetInvolved() {
|
||||||
|
let [ways, setWays] = React.useState<
|
||||||
|
SanityDocument<SGA.GetInvolvedDocument> | undefined
|
||||||
|
>();
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
sanity.getDocument<SGA.GetInvolvedDocument>('ways').then(setWays);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Hero heading='Get Involved' />
|
||||||
|
<h3>SGA Calendar</h3>
|
||||||
|
<iframe
|
||||||
|
src='https://calendar.google.com/calendar/u/0/embed?src=mbftfg4hu7i8ueqrgcb5o7hc6k@group.calendar.google.com&ctz=America/New_York'
|
||||||
|
title='SGA Calendar'
|
||||||
|
width='800'
|
||||||
|
height='600'
|
||||||
|
/>
|
||||||
|
<hr />
|
||||||
|
{ways ? (
|
||||||
|
<>
|
||||||
|
<h3>Here are some ways to connect with SGA:</h3>
|
||||||
|
{ways.ways.map((way) => (
|
||||||
|
<GetInvolvedRow way={way} />
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link, useParams } from 'react-router-dom';
|
import { Link, useParams } from 'react-router-dom';
|
||||||
import Hero from '../components/Hero';
|
import Hero from '../components/Hero';
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
import imageUrl from '../imageUrl';
|
import imageUrl from '../imageUrl';
|
||||||
import BlockContent from '@sanity/block-content-to-react';
|
import BlockContent from '@sanity/block-content-to-react';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Hero from '../components/Hero';
|
import Hero from '../components/Hero';
|
||||||
import MemberRow from '../components/MemberRow';
|
import MemberRow from '../components/MemberRow';
|
||||||
import useQuery from '../hooks/useInitiatives';
|
import useQuery from '../hooks/useQuery';
|
||||||
|
|
||||||
export default function Officers() {
|
export default function Officers() {
|
||||||
let officers = useQuery<SGA.MemberDocument[]>(
|
let officers = useQuery<SGA.MemberDocument[]>(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user