B
B
bodryakov2020-12-24 07:19:19
Frontend
bodryakov, 2020-12-24 07:19:19

Make two separate layouts in Sapper, one for desktop and one for mobile?

How to make two separate layouts in Sapper, for desktop and for mobile. In Svelte, I in Main.js check if userAgent and run either const app = new Appmobile or Appdesktop. But not so in Sapper. I tried to write something like this in client.js and in _layout.svelte - it doesn't work.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question