mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
Feature/lazy load components (#590)
This commit is contained in:
parent
9c38655a92
commit
101292da92
46 changed files with 261 additions and 248 deletions
|
@ -1,5 +1,5 @@
|
|||
import { RegisterError } from '../../components/register-page/register-page'
|
||||
import { expectResponseCode, getApiUrl, defaultFetchConfig } from '../utils'
|
||||
import { defaultFetchConfig, expectResponseCode, getApiUrl } from '../utils'
|
||||
|
||||
export const doInternalLogin = async (username: string, password: string): Promise<void> => {
|
||||
const response = await fetch(getApiUrl() + '/auth/internal', {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { expectResponseCode, getApiUrl, defaultFetchConfig } from '../utils'
|
||||
import { defaultFetchConfig, expectResponseCode, getApiUrl } from '../utils'
|
||||
import { Config } from './types'
|
||||
|
||||
export const getConfig = async (): Promise<Config> => {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
import { expectResponseCode, getApiUrl, defaultFetchConfig } from '../utils'
|
||||
import { HistoryEntry } from '../../components/history-page/history-page'
|
||||
import { defaultFetchConfig, expectResponseCode, getApiUrl } from '../utils'
|
||||
|
||||
export const getHistory = async (): Promise<HistoryEntry[]> => {
|
||||
const response = await fetch(getApiUrl() + '/history')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { UserResponse } from '../users/types'
|
||||
import { expectResponseCode, getApiUrl, defaultFetchConfig } from '../utils'
|
||||
import { defaultFetchConfig, expectResponseCode, getApiUrl } from '../utils'
|
||||
|
||||
export const getMe = async (): Promise<UserResponse> => {
|
||||
const response = await fetch(getApiUrl() + '/me', {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ImageProxyResponse } from '../../components/markdown-renderer/replace-components/image/types'
|
||||
import { expectResponseCode, getApiUrl, defaultFetchConfig } from '../utils'
|
||||
import { defaultFetchConfig, expectResponseCode, getApiUrl } from '../utils'
|
||||
|
||||
export const getProxiedUrl = async (imageUrl: string): Promise<ImageProxyResponse> => {
|
||||
const response = await fetch(getApiUrl() + '/media/proxy', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue