Skip to content

Commit

Permalink
resolving merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchMcQuinn committed Jan 7, 2025
2 parents 1a1a376 + f4b3b75 commit 9ff28c0
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 212 deletions.
20 changes: 15 additions & 5 deletions ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ module.exports = nextTranslate({
destination: '/zero-gravity',
permanent: true,
},
{
source: '/contribute',
destination: 'https://discord.gg/moondao',
permanent: true,
},
{
source: '/es',
destination: '/',
Expand Down Expand Up @@ -203,6 +198,21 @@ module.exports = nextTranslate({
destination: '/submit?tag=contribution',
permanent: true,
},
{
source: '/contribution',
destination: '/submit?tag=contribution',
permanent: true,
},
{
source: '/citizens',
destination: '/network?tab=citizens',
permanent: true,
},
{
source: '/teams',
destination: '/network?tab=teams',
permanent: true,
},
]
},
webpack: (config, { isServer }) => {
Expand Down
159 changes: 0 additions & 159 deletions ui/pages/contribution.tsx

This file was deleted.

117 changes: 69 additions & 48 deletions ui/pages/submit.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,82 @@
import React, { useEffect, useState } from 'react';
import { Tab } from '@headlessui/react';
import { NanceProvider } from "@nance/nance-hooks";
import { NANCE_API_URL } from "../lib/nance/constants";
import Container from '../components/layout/Container';
import ContentLayout from '../components/layout/ContentLayout';
import ProposalEditor from '../components/nance/ProposalEditor';
import ContributionEditor from '../components/contribution/ContributionEditor';
import WebsiteHead from '../components/layout/Head';
import { NoticeFooter } from '../components/layout/NoticeFooter';
import { useRouter } from 'next/router';
import { Tab } from '@headlessui/react'
import { NanceProvider } from '@nance/nance-hooks'
import { useRouter } from 'next/router'
import React, { useEffect, useState } from 'react'
import { NANCE_API_URL } from '../lib/nance/constants'
import { useShallowQueryRoute } from '@/lib/utils/hooks'
import ContributionEditor from '../components/contribution/ContributionEditor'
import Container from '../components/layout/Container'
import ContentLayout from '../components/layout/ContentLayout'
import WebsiteHead from '../components/layout/Head'
import { NoticeFooter } from '../components/layout/NoticeFooter'
import ProposalEditor from '../components/nance/ProposalEditor'
import Image from 'next/image';
import Link from 'next/link';

const SubmissionPage: React.FC = () => {
const router = useRouter();
const { tag } = router.query;
const [selectedIndex, setSelectedIndex] = useState(0);
const title = 'Collaborate with MoonDAO';
const router = useRouter()
const { tag } = router.query
const shallowQueryRoute = useShallowQueryRoute()
const [selectedIndex, setSelectedIndex] = useState(0)
const title = 'Collaborate with MoonDAO'

useEffect(() => {
if (tag === 'contribution') {
setSelectedIndex(1);
} else {
setSelectedIndex(0);
if (selectedIndex === 1) {
shallowQueryRoute({ tag: 'contribution' })
} else if (selectedIndex === 0) {
shallowQueryRoute({ tag: 'proposal' })
}
}, [tag]);
}, [selectedIndex])

const headerContent = (
<div>
</div>
);
useEffect(() => {
if (tag === 'contribution') {
setSelectedIndex(1)
} else if (!tag || tag === 'proposal') {
setSelectedIndex(0)
}
}, [tag])

return (
<>
<WebsiteHead title={title} description={headerContent} />
<WebsiteHead title={title} description="" />
<section className="flex flex-col justify-center items-start animate-fadeIn w-[90vw] md:w-full">
<Container>
<ContentLayout
header="Submissions"
headerSize="40px"
description={headerContent}
description={<div></div>}
mainPadding
mode="compact"
isProfile={true}
>
<div className="flex flex-col gap-4 p-5 bg-slide-section rounded-tl-[2vw] rounded-bl-[2vw]">
<Tab.Group selectedIndex={selectedIndex} onChange={setSelectedIndex}>
<Tab.Group
selectedIndex={selectedIndex}
onChange={setSelectedIndex}
>
<Tab.List className="flex rounded-xl">
<Tab className={({ selected }) =>
`rounded-lg py-2.5 px-5 font-GoodTimes leading-5 focus:outline-none
${selected
? 'bg-gradient-to-r from-[#5757ec] to-[#6b3d79] text-white shadow'
: 'text-white/70 hover:text-white'}`
}>
<Tab
className={({ selected }) =>
`rounded-lg py-2.5 px-5 font-GoodTimes leading-5 focus:outline-none
${
selected
? 'bg-gradient-to-r from-[#5757ec] to-[#6b3d79] text-white shadow'
: 'text-white/70 hover:text-white'
}`
}
>
Submit Proposal
</Tab>
<Tab className={({ selected }) =>
`rounded-lg py-2.5 font-GoodTimes leading-5 px-5 focus:outline-none
${selected
? 'bg-gradient-to-r from-[#5757ec] to-[#6b3d79] text-white shadow'
: 'text-white/70 hover:text-white'}`
}>
<Tab
className={({ selected }) =>
`rounded-lg py-2.5 font-GoodTimes leading-5 px-5 focus:outline-none
${
selected
? 'bg-gradient-to-r from-[#5757ec] to-[#6b3d79] text-white shadow'
: 'text-white/70 hover:text-white'
}`
}
>
Submit Contribution
</Tab>
</Tab.List>
Expand Down Expand Up @@ -106,8 +122,8 @@ const SubmissionPage: React.FC = () => {
Submit a proposal to receive financing or special permissions from voting MoonDAO members. Please refer to {' '}
<a href="https://docs.moondao.com/Projects/Project-System" className="text-blue-400 hover:text-blue-300 underline">
our documentation
</a>
{' '}for more details before getting started.
</a>{' '}
for more details before getting started.
</p>
</div>
<NanceProvider apiUrl={NANCE_API_URL}>
Expand All @@ -117,11 +133,16 @@ const SubmissionPage: React.FC = () => {
<Tab.Panel>
<div className="mb-8">
<p className="text-gray-300">
What have you done to accelerate the impact of MoonDAO's mission? Submit your results for senate review and potential rewards. Please refer to {' '}
<a href="https://docs.moondao.com/Projects/Project-System" className="text-blue-400 hover:text-blue-300 underline">
What have you done to accelerate the impact of MoonDAO's
mission? Submit your results for senate review and
potential rewards. Please refer to{' '}
<a
href="https://docs.moondao.com/Projects/Project-System"
className="text-blue-400 hover:text-blue-300 underline"
>
our documentation
</a>
{' '}for more details.
</a>{' '}
for more details.
</p>
</div>
<ContributionEditor />
Expand All @@ -134,7 +155,7 @@ const SubmissionPage: React.FC = () => {
</Container>
</section>
</>
);
};
)
}

export default SubmissionPage;
export default SubmissionPage

0 comments on commit 9ff28c0

Please sign in to comment.