on master help sign in
index.js: amend to remove star.market (#1416)
499cfa5matildepark
pages/index.js+7−77
@@ -51,62 +51,6 @@ const Banner = ({ children, isOpen, href, dismiss }) => {
51};
51};
52
52
53export default function Home({ posts, events, openGrantsCount, search }) {
53export default function Home({ posts, events, openGrantsCount, search }) {
54− const [heroButton, setHeroButton] = useState(<div />);
55− const [bannerElement, setBannerElement] = useState(null);
56− const [isBannerOpen, setBanner] = useLocalStorage(
57− "urbit-banner-softdist",
58− true
59− );
60−
61− const selectDownloadButton = () => {
62− const agent = window.navigator.appVersion;
63− if (agent.includes("Win")) {
64− return (
65− <span className="button-lg type-ui mb-5 bg-wall-600 text-white">
66− Coming soon for Windows
67− </span>
68− );
69− } else if (agent.includes("Mac")) {
70− return (
71− <a href="https://github.com/urbit/port/releases/latest/download/Port.dmg">
72− <button className="button-lg type-ui mb-5 bg-green-400 text-white">
73− Download For macOS
74− </button>
75− </a>
76− );
77− } else if (agent.includes("Linux")) {
78− return (
79− <code className="button-lg type-ui mb-5 bg-wall-600 text-white">
80− sudo snap install port
81− </code>
82− );
83− }
84− };
85−
86− useEffect(() => {
87− setHeroButton(selectDownloadButton());
88− }, []);
89−
90− // Use this pattern when depending on client-side state or conditions like localStorage, user OS or geolocation.
91− const selectBanner = (isBannerOpen) => {
92− if (isBannerOpen) {
93− return (
94− <Banner
95− href="https://assembly.urbit.org"
96− dismiss={() => setBanner(false)}
97− >
98− <p className="text-green-400 font-semibold hover:opacity-70">{`-> Network update is live. Learn more at Assembly 2021.`}</p>
99− </Banner>
100− );
101− } else {
102− return null;
103− }
104− };
105−
106− useEffect(() => {
107− setBannerElement(selectBanner(isBannerOpen));
108− }, [isBannerOpen]);
109−
110 return (
54 return (
111 <Container>
55 <Container>
112 <Head>
56 <Head>
@@ -127,22 +71,21 @@ export default function Home({ posts, events, openGrantsCount, search }) {
127 </Section>
71 </Section>
128
72
129 {
73 {
130− // Introducing Port
74+ // Hero
131 }
75 }
132 <Section>
76 <Section>
133 <div className="bg-wall-100 w-full p-8 md:p-12 rounded-3xl flex flex-col md:flex-row">
77 <div className="bg-wall-100 w-full p-8 md:p-12 rounded-3xl flex flex-col md:flex-row">
134 <div className="md:w-6/12 w-full md:mr-6">
78 <div className="md:w-6/12 w-full md:mr-6">
135− <h2 className="pb-4">New at Urbit</h2>
136− <h4 className="pb-4">
137− Get on Urbit with these guides or swap a star for WSTR.
138− </h4>
139 <p>
79 <p>
140 Urbit is for everyone, but sometimes it is easy to get lost in
80 Urbit is for everyone, but sometimes it is easy to get lost in
81+ this universe.
82+ </p>
83+ <p className="pt-8">
141− this universe. Follow these links to contribute to the network
84+ Follow these links to contribute to the network through
142− through developing, operating, exploring, or exchanging.
85+ developing, operating, and exploring.
143 </p>
86 </p>
144 </div>
87 </div>
145− <div className="pt-8 md:pt-20 md:w-6/12 w-full md:ml-6">
88+ <div className="pt-8 md:pt-0 md:w-6/12 w-full md:ml-6">
146 <BubbleLink
89 <BubbleLink
147 href="https://developers.urbit.org"
90 href="https://developers.urbit.org"
148 title="Developers"
91 title="Developers"
@@ -182,19 +125,6 @@ export default function Home({ posts, events, openGrantsCount, search }) {
182 src="/images/network-explorer-logo.png"
125 src="/images/network-explorer-logo.png"
183 />
126 />
184 </BubbleLink>
127 </BubbleLink>
185− <BubbleLink
186− href="https://star.market/"
187− className="mt-4 md:h-16"
188− target="_blank"
189− title="Star Market"
190− caption="Exchange Stars and WSTR."
191− >
192− <img
193− alt="Marketplace logo"
194− className="max-w-none w-12 h-12 rounded-full"
195− src="/images/star-market-logo.png"
196− />
197− </BubbleLink>
198 </div>
128 </div>
199 </div>
129 </div>
200 </Section>
130 </Section>