Skip to content

Commit 093e4c2

Browse files
committed
Extract <TermsOfServiceAndPrivacyPolicy>
1 parent 5058278 commit 093e4c2

File tree

1 file changed

+24
-44
lines changed

1 file changed

+24
-44
lines changed

components/dashboard/src/Login.tsx

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -132,27 +132,7 @@ const PAYGLoginWrapper: FC<LoginWrapperProps> = ({ providerFromContext, repoPath
132132
</p>
133133
</div>
134134
}
135-
<div className="flex-none mx-auto text-center px-4 pb-4">
136-
<span className="text-gray-400 dark:text-gray-500 text-sm">
137-
By signing in, you agree to our{" "}
138-
<a
139-
className="gp-link hover:text-gray-600"
140-
target="gitpod-terms"
141-
href="https://www.gitpod.io/terms/"
142-
>
143-
terms of service
144-
</a>{" "}
145-
and{" "}
146-
<a
147-
className="gp-link hover:text-gray-600"
148-
target="gitpod-privacy"
149-
href="https://www.gitpod.io/privacy/"
150-
>
151-
privacy policy
152-
</a>
153-
.
154-
</span>
155-
</div>
135+
<TermsOfServiceAndPrivacyPolicy />
156136
</div>
157137
</div>
158138
</>
@@ -179,29 +159,7 @@ const EnterpriseLoginWrapper: FC<LoginWrapperProps> = ({ providerFromContext, re
179159
/>
180160
</div>
181161
)}
182-
{!needsSetup && !needsSetupCheckLoading && (
183-
<div className="flex-none mx-auto text-center px-4 pb-4">
184-
<span className="text-gray-400 dark:text-gray-500 text-sm">
185-
By signing in, you agree to our{" "}
186-
<a
187-
className="gp-link hover:text-gray-600"
188-
target="gitpod-terms"
189-
href="https://www.gitpod.io/terms/"
190-
>
191-
terms of service
192-
</a>{" "}
193-
and{" "}
194-
<a
195-
className="gp-link hover:text-gray-600"
196-
target="gitpod-privacy"
197-
href="https://www.gitpod.io/privacy/"
198-
>
199-
privacy policy
200-
</a>
201-
.
202-
</span>
203-
</div>
204-
)}
162+
{!needsSetup && !needsSetupCheckLoading && <TermsOfServiceAndPrivacyPolicy />}
205163
</div>
206164
</div>
207165
);
@@ -419,3 +377,25 @@ const GreenCheckIcon = () => {
419377
</div>
420378
);
421379
};
380+
381+
const TermsOfServiceAndPrivacyPolicy = () => {
382+
return (
383+
<div className="flex-none mx-auto text-center px-4 pb-4">
384+
<span className="text-gray-400 dark:text-gray-500 text-sm">
385+
By signing in, you agree to our{" "}
386+
<a className="gp-link hover:text-gray-600" target="gitpod-terms" href="https://www.gitpod.io/terms/">
387+
terms of service
388+
</a>{" "}
389+
and{" "}
390+
<a
391+
className="gp-link hover:text-gray-600"
392+
target="gitpod-privacy"
393+
href="https://www.gitpod.io/privacy/"
394+
>
395+
privacy policy
396+
</a>
397+
.
398+
</span>
399+
</div>
400+
);
401+
};

0 commit comments

Comments
 (0)