refactor: added support for base url using a shared function
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { route } from 'preact-router'
|
||||
import { useState } from 'preact/hooks'
|
||||
import { isAdministrator, Solution as SolutionModel, SolutionId, User as UserModel } from '../../shared/model'
|
||||
import { sortByStringKey } from '../../shared/utils'
|
||||
import { prependBaseUrl, server } from '../api'
|
||||
|
||||
import { server } from '../api'
|
||||
import { prependBaseUrl, sortByStringKey } from '../../shared/utils'
|
||||
|
||||
import { Header } from '../components/Header'
|
||||
import { MarkdownEditor } from '../components/MarkdownEditor'
|
||||
import { Select } from '../components/Select'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { prependBaseUrl } from '../api.js'
|
||||
import { prependBaseUrl } from '../../shared/utils'
|
||||
|
||||
import { Header } from '../components/Header.jsx'
|
||||
|
||||
export const LoginPage = () => {
|
||||
@@ -7,7 +8,9 @@ export const LoginPage = () => {
|
||||
<Header />
|
||||
<main class="page-login">
|
||||
<div class="fill">
|
||||
<a class="button" role="button" href={prependBaseUrl('/auth/redirect')} data-native>Accedi con Ateneo</a>
|
||||
<a class="button" role="button" href={prependBaseUrl('/auth/redirect')} data-native>
|
||||
Accedi con Ateneo
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
</>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { route } from 'preact-router'
|
||||
import { useContext, useEffect, useState } from 'preact/hooks'
|
||||
import { isAdministrator, Problem as ProblemModel, Solution as SolutionModel } from '../../shared/model'
|
||||
import { prependBaseUrl, server } from '../api'
|
||||
import { prependBaseUrl } from '../../shared/utils'
|
||||
import { server } from '../api'
|
||||
import { Header } from '../components/Header'
|
||||
import { MarkdownEditor } from '../components/MarkdownEditor'
|
||||
import { Problem } from '../components/Problem'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { route } from 'preact-router'
|
||||
import { isAdministrator, Solution as SolutionModel, User } from '../../shared/model'
|
||||
import { sortByStringKey } from '../../shared/utils'
|
||||
import { prependBaseUrl } from '../api'
|
||||
import { prependBaseUrl } from '../../shared/utils'
|
||||
import { Header } from '../components/Header'
|
||||
import { Solution } from '../components/Solution'
|
||||
import { useResource } from '../hooks'
|
||||
|
||||
Reference in New Issue
Block a user