fix(user-home): add reference tab loading skeletons
This commit is contained in:
1 parent
4c6b02a6b9
commit
5a17b399a0
7 files changed
+166
-12
No files matched your search
@@ -71,9 +71,14 @@ require_once AKSRT_DIR . '/templates/parts/user-shared-helpers.php';
|
||||
if (!locate_template(['templates/parts/user-home/panel-' . $panel_tab . '.php'], false, false)) {
|
||||
continue;
|
||||
}
|
||||
$defer_panel = in_array($panel_tab, ['favorites', 'follow'], true) && $panel_tab !== $active_tab;
|
||||
$panel_context = $ctx;
|
||||
if ($defer_panel) {
|
||||
$panel_context['placeholder_only'] = true;
|
||||
}
|
||||
?>
|
||||
<div id="panel-<?php echo esc_attr($panel_tab); ?>" class="dashboard-panel<?php echo $panel_tab === $active_tab ? ' is-active' : ''; ?>" role="tabpanel"<?php echo $panel_tab !== $active_tab ? ' hidden' : ''; ?>>
|
||||
<?php get_template_part('templates/parts/user-home/panel', $panel_tab, $ctx); ?>
|
||||
<div id="panel-<?php echo esc_attr($panel_tab); ?>" class="dashboard-panel<?php echo $panel_tab === $active_tab ? ' is-active' : ''; ?>" role="tabpanel" data-panel-loaded="<?php echo $defer_panel ? 'false' : 'true'; ?>"<?php echo $panel_tab !== $active_tab ? ' hidden' : ''; ?>>
|
||||
<?php get_template_part('templates/parts/user-home/panel', $panel_tab, $panel_context); ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user